package cn.ruituo.adv9;
import java.util.*;
public class Book2 {
    private int id;
    private String name,publish;
    private float price;

    private List<Author> authors=new ArrayList<>(0);
    public Book2(){}

    public Book2(int id, String name, String publish, float price) {
        this.id = id;
        this.name = name;
        this.publish = publish;
        this.price = price;
    }

    public List<Author> getAuthors() {
        return authors;
    }

    public void setAuthors(List<Author> authors) {
        this.authors = authors;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPublish() {
        return publish;
    }

    public void setPublish(String publish) {
        this.publish = publish;
    }

    public float getPrice() {
        return price;
    }

    @Override
    public String toString() {
        return "Book2{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", publish='" + publish + '\'' +
                ", price=" + price +
                '}';
    }

    public void setPrice(float price) {
        this.price = price;
    }
}
